<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span id="local-6989586621681006304"></span><span class="hs-comment">--------------------------------------------------------------------------------</span><span>
</span><span id="line-2"></span><span class="hs-comment">-- | The LLVM abstract syntax.</span><span>
</span><span id="line-3"></span><span class="hs-comment">--</span><span>
</span><span id="line-4"></span><span>
</span><span id="line-5"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Llvm.Syntax</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-6"></span><span>
</span><span id="line-7"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Llvm.MetaData.html"><span class="hs-identifier">GHC.Llvm.MetaData</span></a></span><span>
</span><span id="line-10"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html"><span class="hs-identifier">GHC.Llvm.Types</span></a></span><span>
</span><span id="line-11"></span><span>
</span><span id="line-12"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span>
</span><span id="line-13"></span><span>
</span><span id="line-14"></span><span class="hs-comment">-- | Block labels</span><span>
</span><span id="line-15"></span><span class="hs-keyword">type</span><span> </span><span id="LlvmBlockId"><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmBlockId"><span class="hs-identifier hs-var">LlvmBlockId</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span class="hs-comment">-- | A block of LLVM code.</span><span>
</span><span id="line-18"></span><span class="hs-keyword">data</span><span> </span><span id="LlvmBlock"><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmBlock"><span class="hs-identifier hs-var">LlvmBlock</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="LlvmBlock"><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmBlock"><span class="hs-identifier hs-var">LlvmBlock</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-19"></span><span>    </span><span class="hs-comment">-- | The code label for this block</span><span>
</span><span id="line-20"></span><span>    </span><span id="blockLabel"><span class="annot"><span class="annottext">LlvmBlock -&gt; LlvmBlockId
</span><a href="GHC.Llvm.Syntax.html#blockLabel"><span class="hs-identifier hs-var hs-var">blockLabel</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmBlockId"><span class="hs-identifier hs-type">LlvmBlockId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span>    </span><span class="hs-comment">-- | A list of LlvmStatement's representing the code for this block.</span><span>
</span><span id="line-23"></span><span>    </span><span class="hs-comment">-- This list must end with a control flow statement.</span><span>
</span><span id="line-24"></span><span>    </span><span id="blockStmts"><span class="annot"><span class="annottext">LlvmBlock -&gt; [LlvmStatement]
</span><a href="GHC.Llvm.Syntax.html#blockStmts"><span class="hs-identifier hs-var hs-var">blockStmts</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmStatement"><span class="hs-identifier hs-type">LlvmStatement</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-25"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span class="hs-keyword">type</span><span> </span><span id="LlvmBlocks"><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmBlocks"><span class="hs-identifier hs-var">LlvmBlocks</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmBlock"><span class="hs-identifier hs-type">LlvmBlock</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span class="hs-comment">-- | An LLVM Module. This is a top level container in LLVM.</span><span>
</span><span id="line-30"></span><span class="hs-keyword">data</span><span> </span><span id="LlvmModule"><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmModule"><span class="hs-identifier hs-var">LlvmModule</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="LlvmModule"><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmModule"><span class="hs-identifier hs-var">LlvmModule</span></a></span></span><span>  </span><span class="hs-special">{</span><span>
</span><span id="line-31"></span><span>    </span><span class="hs-comment">-- | Comments to include at the start of the module.</span><span>
</span><span id="line-32"></span><span>    </span><span id="modComments"><span class="annot"><span class="annottext">LlvmModule -&gt; [LMString]
</span><a href="GHC.Llvm.Syntax.html#modComments"><span class="hs-identifier hs-var hs-var">modComments</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Llvm.Types.html#LMString"><span class="hs-identifier hs-type">LMString</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>
</span><span id="line-34"></span><span>    </span><span class="hs-comment">-- | LLVM Alias type definitions.</span><span>
</span><span id="line-35"></span><span>    </span><span id="modAliases"><span class="annot"><span class="annottext">LlvmModule -&gt; [LlvmAlias]
</span><a href="GHC.Llvm.Syntax.html#modAliases"><span class="hs-identifier hs-var hs-var">modAliases</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmAlias"><span class="hs-identifier hs-type">LlvmAlias</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span>    </span><span class="hs-comment">-- | LLVM meta data.</span><span>
</span><span id="line-38"></span><span>    </span><span id="modMeta"><span class="annot"><span class="annottext">LlvmModule -&gt; [MetaDecl]
</span><a href="GHC.Llvm.Syntax.html#modMeta"><span class="hs-identifier hs-var hs-var">modMeta</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Llvm.MetaData.html#MetaDecl"><span class="hs-identifier hs-type">MetaDecl</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span>    </span><span class="hs-comment">-- | Global variables to include in the module.</span><span>
</span><span id="line-41"></span><span>    </span><span id="modGlobals"><span class="annot"><span class="annottext">LlvmModule -&gt; [LMGlobal]
</span><a href="GHC.Llvm.Syntax.html#modGlobals"><span class="hs-identifier hs-var hs-var">modGlobals</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Llvm.Types.html#LMGlobal"><span class="hs-identifier hs-type">LMGlobal</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span>    </span><span class="hs-comment">-- | LLVM Functions used in this module but defined in other modules.</span><span>
</span><span id="line-44"></span><span>    </span><span id="modFwdDecls"><span class="annot"><span class="annottext">LlvmModule -&gt; LlvmFunctionDecls
</span><a href="GHC.Llvm.Syntax.html#modFwdDecls"><span class="hs-identifier hs-var hs-var">modFwdDecls</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmFunctionDecls"><span class="hs-identifier hs-type">LlvmFunctionDecls</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-45"></span><span>
</span><span id="line-46"></span><span>    </span><span class="hs-comment">-- | LLVM Functions defined in this module.</span><span>
</span><span id="line-47"></span><span>    </span><span id="modFuncs"><span class="annot"><span class="annottext">LlvmModule -&gt; LlvmFunctions
</span><a href="GHC.Llvm.Syntax.html#modFuncs"><span class="hs-identifier hs-var hs-var">modFuncs</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmFunctions"><span class="hs-identifier hs-type">LlvmFunctions</span></a></span><span>
</span><span id="line-48"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span class="hs-comment">-- | An LLVM Function</span><span>
</span><span id="line-51"></span><span class="hs-keyword">data</span><span> </span><span id="LlvmFunction"><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmFunction"><span class="hs-identifier hs-var">LlvmFunction</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="LlvmFunction"><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmFunction"><span class="hs-identifier hs-var">LlvmFunction</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-52"></span><span>    </span><span class="hs-comment">-- | The signature of this declared function.</span><span>
</span><span id="line-53"></span><span>    </span><span id="funcDecl"><span class="annot"><span class="annottext">LlvmFunction -&gt; LlvmFunctionDecl
</span><a href="GHC.Llvm.Syntax.html#funcDecl"><span class="hs-identifier hs-var hs-var">funcDecl</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmFunctionDecl"><span class="hs-identifier hs-type">LlvmFunctionDecl</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span>    </span><span class="hs-comment">-- | The functions arguments</span><span>
</span><span id="line-56"></span><span>    </span><span id="funcArgs"><span class="annot"><span class="annottext">LlvmFunction -&gt; [LMString]
</span><a href="GHC.Llvm.Syntax.html#funcArgs"><span class="hs-identifier hs-var hs-var">funcArgs</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Llvm.Types.html#LMString"><span class="hs-identifier hs-type">LMString</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-57"></span><span>
</span><span id="line-58"></span><span>    </span><span class="hs-comment">-- | The function attributes.</span><span>
</span><span id="line-59"></span><span>    </span><span id="funcAttrs"><span class="annot"><span class="annottext">LlvmFunction -&gt; [LlvmFuncAttr]
</span><a href="GHC.Llvm.Syntax.html#funcAttrs"><span class="hs-identifier hs-var hs-var">funcAttrs</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmFuncAttr"><span class="hs-identifier hs-type">LlvmFuncAttr</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-60"></span><span>
</span><span id="line-61"></span><span>    </span><span class="hs-comment">-- | The section to put the function into,</span><span>
</span><span id="line-62"></span><span>    </span><span id="funcSect"><span class="annot"><span class="annottext">LlvmFunction -&gt; LMSection
</span><a href="GHC.Llvm.Syntax.html#funcSect"><span class="hs-identifier hs-var hs-var">funcSect</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LMSection"><span class="hs-identifier hs-type">LMSection</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-63"></span><span>
</span><span id="line-64"></span><span>    </span><span class="hs-comment">-- | Prefix data</span><span>
</span><span id="line-65"></span><span>    </span><span id="funcPrefix"><span class="annot"><span class="annottext">LlvmFunction -&gt; Maybe LlvmStatic
</span><a href="GHC.Llvm.Syntax.html#funcPrefix"><span class="hs-identifier hs-var hs-var">funcPrefix</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmStatic"><span class="hs-identifier hs-type">LlvmStatic</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-66"></span><span>
</span><span id="line-67"></span><span>    </span><span class="hs-comment">-- | The body of the functions.</span><span>
</span><span id="line-68"></span><span>    </span><span id="funcBody"><span class="annot"><span class="annottext">LlvmFunction -&gt; LlvmBlocks
</span><a href="GHC.Llvm.Syntax.html#funcBody"><span class="hs-identifier hs-var hs-var">funcBody</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmBlocks"><span class="hs-identifier hs-type">LlvmBlocks</span></a></span><span>
</span><span id="line-69"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-70"></span><span>
</span><span id="line-71"></span><span class="hs-keyword">type</span><span> </span><span id="LlvmFunctions"><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmFunctions"><span class="hs-identifier hs-var">LlvmFunctions</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmFunction"><span class="hs-identifier hs-type">LlvmFunction</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-72"></span><span>
</span><span id="line-73"></span><span class="hs-keyword">type</span><span> </span><span id="SingleThreaded"><span class="annot"><a href="GHC.Llvm.Syntax.html#SingleThreaded"><span class="hs-identifier hs-var">SingleThreaded</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span class="hs-comment">-- | LLVM ordering types for synchronization purposes. (Introduced in LLVM</span><span>
</span><span id="line-76"></span><span class="hs-comment">-- 3.0). Please see the LLVM documentation for a better description.</span><span>
</span><span id="line-77"></span><span class="hs-keyword">data</span><span> </span><span id="LlvmSyncOrdering"><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmSyncOrdering"><span class="hs-identifier hs-var">LlvmSyncOrdering</span></a></span></span><span>
</span><span id="line-78"></span><span>  </span><span class="hs-comment">-- | Some partial order of operations exists.</span><span>
</span><span id="line-79"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="SyncUnord"><span class="annot"><a href="GHC.Llvm.Syntax.html#SyncUnord"><span class="hs-identifier hs-var">SyncUnord</span></a></span></span><span>
</span><span id="line-80"></span><span>  </span><span class="hs-comment">-- | A single total order for operations at a single address exists.</span><span>
</span><span id="line-81"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="SyncMonotonic"><span class="annot"><a href="GHC.Llvm.Syntax.html#SyncMonotonic"><span class="hs-identifier hs-var">SyncMonotonic</span></a></span></span><span>
</span><span id="line-82"></span><span>  </span><span class="hs-comment">-- | Acquire synchronization operation.</span><span>
</span><span id="line-83"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="SyncAcquire"><span class="annot"><a href="GHC.Llvm.Syntax.html#SyncAcquire"><span class="hs-identifier hs-var">SyncAcquire</span></a></span></span><span>
</span><span id="line-84"></span><span>  </span><span class="hs-comment">-- | Release synchronization operation.</span><span>
</span><span id="line-85"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="SyncRelease"><span class="annot"><a href="GHC.Llvm.Syntax.html#SyncRelease"><span class="hs-identifier hs-var">SyncRelease</span></a></span></span><span>
</span><span id="line-86"></span><span>  </span><span class="hs-comment">-- | Acquire + Release synchronization operation.</span><span>
</span><span id="line-87"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="SyncAcqRel"><span class="annot"><a href="GHC.Llvm.Syntax.html#SyncAcqRel"><span class="hs-identifier hs-var">SyncAcqRel</span></a></span></span><span>
</span><span id="line-88"></span><span>  </span><span class="hs-comment">-- | Full sequential Consistency operation.</span><span>
</span><span id="line-89"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="SyncSeqCst"><span class="annot"><a href="GHC.Llvm.Syntax.html#SyncSeqCst"><span class="hs-identifier hs-var">SyncSeqCst</span></a></span></span><span>
</span><span id="line-90"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681006273"><span id="local-6989586621681006275"><span id="local-6989586621681006277"><span class="annot"><span class="annottext">Int -&gt; LlvmSyncOrdering -&gt; ShowS
[LlvmSyncOrdering] -&gt; ShowS
LlvmSyncOrdering -&gt; String
(Int -&gt; LlvmSyncOrdering -&gt; ShowS)
-&gt; (LlvmSyncOrdering -&gt; String)
-&gt; ([LlvmSyncOrdering] -&gt; ShowS)
-&gt; Show LlvmSyncOrdering
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [LlvmSyncOrdering] -&gt; ShowS
$cshowList :: [LlvmSyncOrdering] -&gt; ShowS
show :: LlvmSyncOrdering -&gt; String
$cshow :: LlvmSyncOrdering -&gt; String
showsPrec :: Int -&gt; LlvmSyncOrdering -&gt; ShowS
$cshowsPrec :: Int -&gt; LlvmSyncOrdering -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681006268"><span id="local-6989586621681006270"><span class="annot"><span class="annottext">LlvmSyncOrdering -&gt; LlvmSyncOrdering -&gt; Bool
(LlvmSyncOrdering -&gt; LlvmSyncOrdering -&gt; Bool)
-&gt; (LlvmSyncOrdering -&gt; LlvmSyncOrdering -&gt; Bool)
-&gt; Eq LlvmSyncOrdering
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: LlvmSyncOrdering -&gt; LlvmSyncOrdering -&gt; Bool
$c/= :: LlvmSyncOrdering -&gt; LlvmSyncOrdering -&gt; Bool
== :: LlvmSyncOrdering -&gt; LlvmSyncOrdering -&gt; Bool
$c== :: LlvmSyncOrdering -&gt; LlvmSyncOrdering -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span class="hs-comment">-- | LLVM atomic operations. Please see the @atomicrmw@ instruction in</span><span>
</span><span id="line-93"></span><span class="hs-comment">-- the LLVM documentation for a complete description.</span><span>
</span><span id="line-94"></span><span class="hs-keyword">data</span><span> </span><span id="LlvmAtomicOp"><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmAtomicOp"><span class="hs-identifier hs-var">LlvmAtomicOp</span></a></span></span><span>
</span><span id="line-95"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="LAO_Xchg"><span class="annot"><a href="GHC.Llvm.Syntax.html#LAO_Xchg"><span class="hs-identifier hs-var">LAO_Xchg</span></a></span></span><span>
</span><span id="line-96"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="LAO_Add"><span class="annot"><a href="GHC.Llvm.Syntax.html#LAO_Add"><span class="hs-identifier hs-var">LAO_Add</span></a></span></span><span>
</span><span id="line-97"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="LAO_Sub"><span class="annot"><a href="GHC.Llvm.Syntax.html#LAO_Sub"><span class="hs-identifier hs-var">LAO_Sub</span></a></span></span><span>
</span><span id="line-98"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="LAO_And"><span class="annot"><a href="GHC.Llvm.Syntax.html#LAO_And"><span class="hs-identifier hs-var">LAO_And</span></a></span></span><span>
</span><span id="line-99"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="LAO_Nand"><span class="annot"><a href="GHC.Llvm.Syntax.html#LAO_Nand"><span class="hs-identifier hs-var">LAO_Nand</span></a></span></span><span>
</span><span id="line-100"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="LAO_Or"><span class="annot"><a href="GHC.Llvm.Syntax.html#LAO_Or"><span class="hs-identifier hs-var">LAO_Or</span></a></span></span><span>
</span><span id="line-101"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="LAO_Xor"><span class="annot"><a href="GHC.Llvm.Syntax.html#LAO_Xor"><span class="hs-identifier hs-var">LAO_Xor</span></a></span></span><span>
</span><span id="line-102"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="LAO_Max"><span class="annot"><a href="GHC.Llvm.Syntax.html#LAO_Max"><span class="hs-identifier hs-var">LAO_Max</span></a></span></span><span>
</span><span id="line-103"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="LAO_Min"><span class="annot"><a href="GHC.Llvm.Syntax.html#LAO_Min"><span class="hs-identifier hs-var">LAO_Min</span></a></span></span><span>
</span><span id="line-104"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="LAO_Umax"><span class="annot"><a href="GHC.Llvm.Syntax.html#LAO_Umax"><span class="hs-identifier hs-var">LAO_Umax</span></a></span></span><span>
</span><span id="line-105"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="LAO_Umin"><span class="annot"><a href="GHC.Llvm.Syntax.html#LAO_Umin"><span class="hs-identifier hs-var">LAO_Umin</span></a></span></span><span>
</span><span id="line-106"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681006250"><span id="local-6989586621681006252"><span id="local-6989586621681006254"><span class="annot"><span class="annottext">Int -&gt; LlvmAtomicOp -&gt; ShowS
[LlvmAtomicOp] -&gt; ShowS
LlvmAtomicOp -&gt; String
(Int -&gt; LlvmAtomicOp -&gt; ShowS)
-&gt; (LlvmAtomicOp -&gt; String)
-&gt; ([LlvmAtomicOp] -&gt; ShowS)
-&gt; Show LlvmAtomicOp
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [LlvmAtomicOp] -&gt; ShowS
$cshowList :: [LlvmAtomicOp] -&gt; ShowS
show :: LlvmAtomicOp -&gt; String
$cshow :: LlvmAtomicOp -&gt; String
showsPrec :: Int -&gt; LlvmAtomicOp -&gt; ShowS
$cshowsPrec :: Int -&gt; LlvmAtomicOp -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681006246"><span id="local-6989586621681006248"><span class="annot"><span class="annottext">LlvmAtomicOp -&gt; LlvmAtomicOp -&gt; Bool
(LlvmAtomicOp -&gt; LlvmAtomicOp -&gt; Bool)
-&gt; (LlvmAtomicOp -&gt; LlvmAtomicOp -&gt; Bool) -&gt; Eq LlvmAtomicOp
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: LlvmAtomicOp -&gt; LlvmAtomicOp -&gt; Bool
$c/= :: LlvmAtomicOp -&gt; LlvmAtomicOp -&gt; Bool
== :: LlvmAtomicOp -&gt; LlvmAtomicOp -&gt; Bool
$c== :: LlvmAtomicOp -&gt; LlvmAtomicOp -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span class="hs-comment">-- | Llvm Statements</span><span>
</span><span id="line-109"></span><span class="hs-keyword">data</span><span> </span><span id="LlvmStatement"><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmStatement"><span class="hs-identifier hs-var">LlvmStatement</span></a></span></span><span>
</span><span id="line-110"></span><span>  </span><span class="hs-comment">{- |
    Assign an expression to a variable:
      * dest:   Variable to assign to
      * source: Source expression
  -}</span><span>
</span><span id="line-115"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="Assignment"><span class="annot"><a href="GHC.Llvm.Syntax.html#Assignment"><span class="hs-identifier hs-var">Assignment</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmExpression"><span class="hs-identifier hs-type">LlvmExpression</span></a></span><span>
</span><span id="line-116"></span><span>
</span><span id="line-117"></span><span>  </span><span class="hs-comment">{- |
    Memory fence operation
  -}</span><span>
</span><span id="line-120"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Fence"><span class="annot"><a href="GHC.Llvm.Syntax.html#Fence"><span class="hs-identifier hs-var">Fence</span></a></span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmSyncOrdering"><span class="hs-identifier hs-type">LlvmSyncOrdering</span></a></span><span>
</span><span id="line-121"></span><span>
</span><span id="line-122"></span><span>  </span><span class="hs-comment">{- |
    Always branch to the target label
  -}</span><span>
</span><span id="line-125"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Branch"><span class="annot"><a href="GHC.Llvm.Syntax.html#Branch"><span class="hs-identifier hs-var">Branch</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span>  </span><span class="hs-comment">{- |
    Branch to label targetTrue if cond is true otherwise to label targetFalse
      * cond:        condition that will be tested, must be of type i1
      * targetTrue:  label to branch to if cond is true
      * targetFalse: label to branch to if cond is false
  -}</span><span>
</span><span id="line-133"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="BranchIf"><span class="annot"><a href="GHC.Llvm.Syntax.html#BranchIf"><span class="hs-identifier hs-var">BranchIf</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span>  </span><span class="hs-comment">{- |
    Comment
    Plain comment.
  -}</span><span>
</span><span id="line-139"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Comment"><span class="annot"><a href="GHC.Llvm.Syntax.html#Comment"><span class="hs-identifier hs-var">Comment</span></a></span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Llvm.Types.html#LMString"><span class="hs-identifier hs-type">LMString</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span>  </span><span class="hs-comment">{- |
    Set a label on this position.
      * name: Identifier of this label, unique for this module
  -}</span><span>
</span><span id="line-145"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="MkLabel"><span class="annot"><a href="GHC.Llvm.Syntax.html#MkLabel"><span class="hs-identifier hs-var">MkLabel</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmBlockId"><span class="hs-identifier hs-type">LlvmBlockId</span></a></span><span>
</span><span id="line-146"></span><span>
</span><span id="line-147"></span><span>  </span><span class="hs-comment">{- |
    Store variable value in pointer ptr. If value is of type t then ptr must
    be of type t*.
      * value: Variable/Constant to store.
      * ptr:   Location to store the value in
  -}</span><span>
</span><span id="line-153"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Store"><span class="annot"><a href="GHC.Llvm.Syntax.html#Store"><span class="hs-identifier hs-var">Store</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span>
</span><span id="line-154"></span><span>
</span><span id="line-155"></span><span>  </span><span class="hs-comment">{- |
    Multiway branch
      * scrutinee: Variable or constant which must be of integer type that is
                   determines which arm is chosen.
      * def:       The default label if there is no match in target.
      * target:    A list of (value,label) where the value is an integer
                   constant and label the corresponding label to jump to if the
                   scrutinee matches the value.
  -}</span><span>
</span><span id="line-164"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Switch"><span class="annot"><a href="GHC.Llvm.Syntax.html#Switch"><span class="hs-identifier hs-var">Switch</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-165"></span><span>
</span><span id="line-166"></span><span>  </span><span class="hs-comment">{- |
    Return a result.
      * result: The variable or constant to return
  -}</span><span>
</span><span id="line-170"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Return"><span class="annot"><a href="GHC.Llvm.Syntax.html#Return"><span class="hs-identifier hs-var">Return</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-171"></span><span>
</span><span id="line-172"></span><span>  </span><span class="hs-comment">{- |
    An instruction for the optimizer that the code following is not reachable
  -}</span><span>
</span><span id="line-175"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Unreachable"><span class="annot"><a href="GHC.Llvm.Syntax.html#Unreachable"><span class="hs-identifier hs-var">Unreachable</span></a></span></span><span>
</span><span id="line-176"></span><span>
</span><span id="line-177"></span><span>  </span><span class="hs-comment">{- |
    Raise an expression to a statement (if don't want result or want to use
    Llvm unnamed values.
  -}</span><span>
</span><span id="line-181"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Expr"><span class="annot"><a href="GHC.Llvm.Syntax.html#Expr"><span class="hs-identifier hs-var">Expr</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmExpression"><span class="hs-identifier hs-type">LlvmExpression</span></a></span><span>
</span><span id="line-182"></span><span>
</span><span id="line-183"></span><span>  </span><span class="hs-comment">{- |
    A nop LLVM statement. Useful as its often more efficient to use this
    then to wrap LLvmStatement in a Just or [].
  -}</span><span>
</span><span id="line-187"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Nop"><span class="annot"><a href="GHC.Llvm.Syntax.html#Nop"><span class="hs-identifier hs-var">Nop</span></a></span></span><span>
</span><span id="line-188"></span><span>
</span><span id="line-189"></span><span>  </span><span class="hs-comment">{- |
    A LLVM statement with metadata attached to it.
  -}</span><span>
</span><span id="line-192"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="MetaStmt"><span class="annot"><a href="GHC.Llvm.Syntax.html#MetaStmt"><span class="hs-identifier hs-var">MetaStmt</span></a></span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Llvm.MetaData.html#MetaAnnot"><span class="hs-identifier hs-type">MetaAnnot</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmStatement"><span class="hs-identifier hs-type">LlvmStatement</span></a></span><span>
</span><span id="line-193"></span><span>
</span><span id="line-194"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681006202"><span id="local-6989586621681006231"><span class="annot"><span class="annottext">LlvmStatement -&gt; LlvmStatement -&gt; Bool
(LlvmStatement -&gt; LlvmStatement -&gt; Bool)
-&gt; (LlvmStatement -&gt; LlvmStatement -&gt; Bool) -&gt; Eq LlvmStatement
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: LlvmStatement -&gt; LlvmStatement -&gt; Bool
$c/= :: LlvmStatement -&gt; LlvmStatement -&gt; Bool
== :: LlvmStatement -&gt; LlvmStatement -&gt; Bool
$c== :: LlvmStatement -&gt; LlvmStatement -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-195"></span><span>
</span><span id="line-196"></span><span>
</span><span id="line-197"></span><span class="hs-comment">-- | Llvm Expressions</span><span>
</span><span id="line-198"></span><span class="hs-keyword">data</span><span> </span><span id="LlvmExpression"><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmExpression"><span class="hs-identifier hs-var">LlvmExpression</span></a></span></span><span>
</span><span id="line-199"></span><span>  </span><span class="hs-comment">{- |
    Allocate amount * sizeof(tp) bytes on the stack
      * tp:     LlvmType to reserve room for
      * amount: The nr of tp's which must be allocated
  -}</span><span>
</span><span id="line-204"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="Alloca"><span class="annot"><a href="GHC.Llvm.Syntax.html#Alloca"><span class="hs-identifier hs-var">Alloca</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmType"><span class="hs-identifier hs-type">LlvmType</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-205"></span><span>
</span><span id="line-206"></span><span>  </span><span class="hs-comment">{- |
    Perform the machine operator op on the operands left and right
      * op:    operator
      * left:  left operand
      * right: right operand
  -}</span><span>
</span><span id="line-212"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="LlvmOp"><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmOp"><span class="hs-identifier hs-var">LlvmOp</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmMachOp"><span class="hs-identifier hs-type">LlvmMachOp</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span>
</span><span id="line-213"></span><span>
</span><span id="line-214"></span><span>  </span><span class="hs-comment">{- |
    Perform a compare operation on the operands left and right
      * op:    operator
      * left:  left operand
      * right: right operand
  -}</span><span>
</span><span id="line-220"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Compare"><span class="annot"><a href="GHC.Llvm.Syntax.html#Compare"><span class="hs-identifier hs-var">Compare</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmCmpOp"><span class="hs-identifier hs-type">LlvmCmpOp</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span>
</span><span id="line-221"></span><span>
</span><span id="line-222"></span><span>  </span><span class="hs-comment">{- |
    Extract a scalar element from a vector
      * val: The vector
      * idx: The index of the scalar within the vector
  -}</span><span>
</span><span id="line-227"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Extract"><span class="annot"><a href="GHC.Llvm.Syntax.html#Extract"><span class="hs-identifier hs-var">Extract</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span>
</span><span id="line-228"></span><span>
</span><span id="line-229"></span><span>  </span><span class="hs-comment">{- |
    Extract a scalar element from a structure
      * val: The structure
      * idx: The index of the scalar within the structure
    Corresponds to &quot;extractvalue&quot; instruction.
  -}</span><span>
</span><span id="line-235"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ExtractV"><span class="annot"><a href="GHC.Llvm.Syntax.html#ExtractV"><span class="hs-identifier hs-var">ExtractV</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-236"></span><span>
</span><span id="line-237"></span><span>  </span><span class="hs-comment">{- |
    Insert a scalar element into a vector
      * val:   The source vector
      * elt:   The scalar to insert
      * index: The index at which to insert the scalar
  -}</span><span>
</span><span id="line-243"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Insert"><span class="annot"><a href="GHC.Llvm.Syntax.html#Insert"><span class="hs-identifier hs-var">Insert</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span>
</span><span id="line-244"></span><span>
</span><span id="line-245"></span><span>  </span><span class="hs-comment">{- |
    Allocate amount * sizeof(tp) bytes on the heap
      * tp:     LlvmType to reserve room for
      * amount: The nr of tp's which must be allocated
  -}</span><span>
</span><span id="line-250"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Malloc"><span class="annot"><a href="GHC.Llvm.Syntax.html#Malloc"><span class="hs-identifier hs-var">Malloc</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmType"><span class="hs-identifier hs-type">LlvmType</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-251"></span><span>
</span><span id="line-252"></span><span>  </span><span class="hs-comment">{- |
    Load the value at location ptr
  -}</span><span>
</span><span id="line-255"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Load"><span class="annot"><a href="GHC.Llvm.Syntax.html#Load"><span class="hs-identifier hs-var">Load</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span>
</span><span id="line-256"></span><span>
</span><span id="line-257"></span><span>  </span><span class="hs-comment">{- |
    Atomic load of the value at location ptr
  -}</span><span>
</span><span id="line-260"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ALoad"><span class="annot"><a href="GHC.Llvm.Syntax.html#ALoad"><span class="hs-identifier hs-var">ALoad</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmSyncOrdering"><span class="hs-identifier hs-type">LlvmSyncOrdering</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Syntax.html#SingleThreaded"><span class="hs-identifier hs-type">SingleThreaded</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span>
</span><span id="line-261"></span><span>
</span><span id="line-262"></span><span>  </span><span class="hs-comment">{- |
    Navigate in a structure, selecting elements
      * inbound: Is the pointer inbounds? (computed pointer doesn't overflow)
      * ptr:     Location of the structure
      * indexes: A list of indexes to select the correct value.
  -}</span><span>
</span><span id="line-268"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="GetElemPtr"><span class="annot"><a href="GHC.Llvm.Syntax.html#GetElemPtr"><span class="hs-identifier hs-var">GetElemPtr</span></a></span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-269"></span><span>
</span><span id="line-270"></span><span>  </span><span class="hs-comment">{- |
    Cast the variable from to the to type. This is an abstraction of three
    cast operators in Llvm, inttoptr, ptrtoint and bitcast.
       * cast: Cast type
       * from: Variable to cast
       * to:   type to cast to
  -}</span><span>
</span><span id="line-277"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Cast"><span class="annot"><a href="GHC.Llvm.Syntax.html#Cast"><span class="hs-identifier hs-var">Cast</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmCastOp"><span class="hs-identifier hs-type">LlvmCastOp</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmType"><span class="hs-identifier hs-type">LlvmType</span></a></span><span>
</span><span id="line-278"></span><span>
</span><span id="line-279"></span><span>  </span><span class="hs-comment">{- |
    Atomic read-modify-write operation
       * op:       Atomic operation
       * addr:     Address to modify
       * operand:  Operand to operation
       * ordering: Ordering requirement
  -}</span><span>
</span><span id="line-286"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="AtomicRMW"><span class="annot"><a href="GHC.Llvm.Syntax.html#AtomicRMW"><span class="hs-identifier hs-var">AtomicRMW</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmAtomicOp"><span class="hs-identifier hs-type">LlvmAtomicOp</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmSyncOrdering"><span class="hs-identifier hs-type">LlvmSyncOrdering</span></a></span><span>
</span><span id="line-287"></span><span>
</span><span id="line-288"></span><span>  </span><span class="hs-comment">{- |
    Compare-and-exchange operation
       * addr:     Address to modify
       * old:      Expected value
       * new:      New value
       * suc_ord:  Ordering required in success case
       * fail_ord: Ordering required in failure case, can be no stronger than
                   suc_ord

    Result is an @i1@, true if store was successful.
  -}</span><span>
</span><span id="line-299"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CmpXChg"><span class="annot"><a href="GHC.Llvm.Syntax.html#CmpXChg"><span class="hs-identifier hs-var">CmpXChg</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmSyncOrdering"><span class="hs-identifier hs-type">LlvmSyncOrdering</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmSyncOrdering"><span class="hs-identifier hs-type">LlvmSyncOrdering</span></a></span><span>
</span><span id="line-300"></span><span>
</span><span id="line-301"></span><span>  </span><span class="hs-comment">{- |
    Call a function. The result is the value of the expression.
      * tailJumps: CallType to signal if the function should be tail called
      * fnptrval:  An LLVM value containing a pointer to a function to be
                   invoked. Can be indirect. Should be LMFunction type.
      * args:      Concrete arguments for the parameters
      * attrs:     A list of function attributes for the call. Only NoReturn,
                   NoUnwind, ReadOnly and ReadNone are valid here.
  -}</span><span>
</span><span id="line-310"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Call"><span class="annot"><a href="GHC.Llvm.Syntax.html#Call"><span class="hs-identifier hs-var">Call</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmCallType"><span class="hs-identifier hs-type">LlvmCallType</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmFuncAttr"><span class="hs-identifier hs-type">LlvmFuncAttr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-311"></span><span>
</span><span id="line-312"></span><span>  </span><span class="hs-comment">{- |
    Call a function as above but potentially taking metadata as arguments.
      * tailJumps: CallType to signal if the function should be tail called
      * fnptrval:  An LLVM value containing a pointer to a function to be
                   invoked. Can be indirect. Should be LMFunction type.
      * args:      Arguments that may include metadata.
      * attrs:     A list of function attributes for the call. Only NoReturn,
                   NoUnwind, ReadOnly and ReadNone are valid here.
  -}</span><span>
</span><span id="line-321"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CallM"><span class="annot"><a href="GHC.Llvm.Syntax.html#CallM"><span class="hs-identifier hs-var">CallM</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmCallType"><span class="hs-identifier hs-type">LlvmCallType</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Llvm.MetaData.html#MetaExpr"><span class="hs-identifier hs-type">MetaExpr</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmFuncAttr"><span class="hs-identifier hs-type">LlvmFuncAttr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-322"></span><span>
</span><span id="line-323"></span><span>  </span><span class="hs-comment">{- |
    Merge variables from different basic blocks which are predecessors of this
    basic block in a new variable of type tp.
      * tp:         type of the merged variable, must match the types of the
                    predecessor variables.
      * predecessors: A list of variables and the basic block that they originate
                      from.
  -}</span><span>
</span><span id="line-331"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Phi"><span class="annot"><a href="GHC.Llvm.Syntax.html#Phi"><span class="hs-identifier hs-var">Phi</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmType"><span class="hs-identifier hs-type">LlvmType</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-332"></span><span>
</span><span id="line-333"></span><span>  </span><span class="hs-comment">{- |
    Inline assembly expression. Syntax is very similar to the style used by GCC.
      * assembly:    Actual inline assembly code.
      * constraints: Operand constraints.
      * return ty:   Return type of function.
      * vars:        Any variables involved in the assembly code.
      * sideeffect:  Does the expression have side effects not visible from the
                     constraints list.
      * alignstack:  Should the stack be conservatively aligned before this
                     expression is executed.
  -}</span><span>
</span><span id="line-344"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Asm"><span class="annot"><a href="GHC.Llvm.Syntax.html#Asm"><span class="hs-identifier hs-var">Asm</span></a></span></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LMString"><span class="hs-identifier hs-type">LMString</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LMString"><span class="hs-identifier hs-type">LMString</span></a></span><span> </span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmType"><span class="hs-identifier hs-type">LlvmType</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Llvm.Types.html#LlvmVar"><span class="hs-identifier hs-type">LlvmVar</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-345"></span><span>
</span><span id="line-346"></span><span>  </span><span class="hs-comment">{- |
    A LLVM expression with metadata attached to it.
  -}</span><span>
</span><span id="line-349"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="MExpr"><span class="annot"><a href="GHC.Llvm.Syntax.html#MExpr"><span class="hs-identifier hs-var">MExpr</span></a></span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Llvm.MetaData.html#MetaAnnot"><span class="hs-identifier hs-type">MetaAnnot</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><a href="GHC.Llvm.Syntax.html#LlvmExpression"><span class="hs-identifier hs-type">LlvmExpression</span></a></span><span>
</span><span id="line-350"></span><span>
</span><span id="line-351"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681006113"><span id="local-6989586621681006179"><span class="annot"><span class="annottext">LlvmExpression -&gt; LlvmExpression -&gt; Bool
(LlvmExpression -&gt; LlvmExpression -&gt; Bool)
-&gt; (LlvmExpression -&gt; LlvmExpression -&gt; Bool) -&gt; Eq LlvmExpression
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: LlvmExpression -&gt; LlvmExpression -&gt; Bool
$c/= :: LlvmExpression -&gt; LlvmExpression -&gt; Bool
== :: LlvmExpression -&gt; LlvmExpression -&gt; Bool
$c== :: LlvmExpression -&gt; LlvmExpression -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-352"></span><span>
</span><span id="line-353"></span></pre></body></html>